home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 4 / Windows 6-Pak (InfoMagic) (Disc 4) (1999).ISO / Text-Chat-Scripts / pp-320m.exe / pp300 / a-first.mrc < prev    next >
Text File  |  1998-10-10  |  26KB  |  667 lines

  1. ; -----------------------------------------------------
  2. ; Peace and Protection (by misspai)
  3. ; -----------------------------------------------------
  4. ; First time config, aliases section
  5. ; -----------------------------------------------------
  6. 1start {
  7. set %_req.col 15
  8. window -don @@ 0 0 $window(-1).w $window(-1).h Arial $int($calc( [ $window(-1).h ] / 17.64706))
  9. titlebar @@ - Peace and Protection - @@ - First time configuration - @@
  10. set %.fg 14 | set %.bk 1
  11. set %.str * Peace and Protectioná
  12. :loop1
  13. aline @@  $+ %.fg $+ , $+ %.bk $str(%.str,6)
  14. dec %.fg
  15. if ($_vi(.bk) < 15) goto loop1
  16. window -x @@
  17. if (%pp.setuptype == 14) _reqparam 2startC Perform drive scan from drive C: through which drive? (For example, to scan drives C: and D:, enter D)
  18. else 2start z
  19. }
  20. 2start {
  21. if (%pp.setuptype != 13) {
  22. if ($left($1,1) isletter) set %.fz.final $asc($lower($left($1,1)))
  23. else set %.fz.final 122
  24. window -nl @EXE | window -nl @INI
  25. window -nl @MP | window -nl @Wav | window -nl @Mid
  26. window -hl @Filez
  27. _progress.1 Scanning HDs for files... Please wait, this may take a while!
  28. _progress.2 0 0% complete... (drive C:)
  29. set %.fz.dr 99
  30. :loop2
  31. set %.fz.wh $chr(%.fz.dr) $+ :\
  32. echo -s $findfile(%.fz.wh,*.*,@Filez)
  33. savebuf @Filez tempdir.dat
  34. filter -fw tempdir.dat @EXE *.exe
  35. filter -fw tempdir.dat @INI *.ini
  36. filter -fw tempdir.dat @MP *.mp?
  37. filter -fw tempdir.dat @Wav *.wav
  38. filter -fw tempdir.dat @Mid *.mid
  39. .remove tempdir.dat
  40. if ($_vi(.fz.dr) <= %.fz.final) {
  41. clear @Filez
  42. set %.fz.perc $int($calc((%.fz.dr - 99) * 100 / (%.fz.final - 98)))
  43. _progress.2 %.fz.perc %.fz.perc $+ % complete... (drive $upper($chr(%.fz.dr)) $+ :)
  44. goto loop2
  45. }
  46. window -c @Progress
  47. window -c @Filez
  48. _progress.1 Sorting found files... Please wait...
  49. set %.todo $line(@EXE,0)
  50. inc %.todo $line(@INI,0)
  51. inc %.todo $line(@MP,0)
  52. inc %.todo $line(@Wav,0)
  53. inc %.todo $line(@Mid,0)
  54. set %.done 0
  55. window -nldo @Player $_center(600,400,d) 600 400 /1player Fixedsys 9
  56. window -nldo @Mirc $_center(600,400,d) 600 400 /1mirc Fixedsys 9
  57. window -nldo @P&P $_center(600,400,d) 600 400 /1pp Fixedsys 9
  58. window -nldo @MPDir $_center(600,400,d) 600 400 /1mp Fixedsys 9
  59. window -nldo @WavDir $_center(600,400,d) 600 400 /1wav Fixedsys 9
  60. window -nldo @MidDir $_center(600,400,d) 600 400 /1mid Fixedsys 9
  61. set %.cur $line(@EXE,0)
  62. :loop3
  63. set %.ln $line(@EXE,%.cur)
  64. if ((*\winamp.exe iswm %.ln) || (*\winplay3.exe iswm %.ln) || (*\musearc.exe iswm %.ln)) aline @Player %.ln
  65. inc %.done
  66. if ($_vi(.psh) > 8) {
  67. unset %.psh
  68. set %.perc $int($calc(%.done * 100 / %.todo))
  69. _progress.2 %.perc Scanning for OS and MP2/3 players...
  70. }
  71. if ($_vd(.cur) > 0) goto loop3
  72. set %.cur $line(@INI,0)
  73. set %.void $remove($nofile($mircini),pp300\) $+ *
  74. :loop4
  75. set %.ln $line(@INI,%.cur)
  76. if (%.void !iswm %.ln) {
  77. if (*\mirc.ini iswm %.ln) aline @Mirc %.ln
  78. elseif (*\p&p\config.ini iswm %.ln) aline @P&P %.ln
  79. elseif ((*\pp300\config.ini iswm %.ln) && ($mircdirpp300\config.ini != %.ln)) aline @P&P %.ln
  80. }
  81. inc %.done
  82. if ($_vi(.psh) > 8) {
  83. unset %.psh
  84. set %.perc $int($calc(%.done * 100 / %.todo))
  85. _progress.2 %.perc Scanning for previous copies of mIRC and P&P...
  86. }
  87. if ($_vd(.cur) > 0) goto loop4
  88. set %.cur $line(@MP,0)
  89. if (%.cur == 0) goto nope1
  90. set %.cur2 1
  91. set %.sc 0
  92. :loop5
  93. set %.ln $line(@MP,%.cur2)
  94. if ((*.mp2 !iswm %.ln) && (*.mp3 !iswm %.ln)) goto nope5
  95. if ((recycle isin %.ln) || (temp isin %.ln) || (downl isin %.ln) || (tmp isin %.ln) || (cache isin %.ln) || (win isin %.ln)) goto nope5
  96. set %.ln $nofile(%.ln)
  97. if (%.sc > 0) {
  98. set %.do %.sc
  99. :loop6
  100. set %.old $gettok($line(@MPDir,%.do),2-,32)
  101. if (%.old isin %.ln) goto nope5
  102. if ($_vd(.do) > 0) goto loop6
  103. }
  104. aline @MPDir [X] %.ln
  105. inc %.sc
  106. :nope5
  107. inc %.done
  108. if ($_vi(.psh) > 8) {
  109. unset %.psh
  110. set %.perc $int($calc(%.done * 100 / %.todo))
  111. _progress.2 %.perc Determining MP2/3 directories...
  112. }
  113. if ($_vi(.cur2) <= %.cur) goto loop5
  114. :nope1
  115. set %.cur $line(@Mid,0)
  116. if (%.cur == 0) goto nope2
  117. set %.cur2 1
  118. set %.sc 0
  119. :loop7
  120. set %.ln $nofile($line(@Mid,%.cur2))
  121. if ((recycle isin %.ln) || (temp isin %.ln) || (downl isin %.ln) || (tmp isin %.ln) || (cache isin %.ln) || (win isin %.ln)) goto nope7
  122. if (%.sc > 0) {
  123. set %.do %.sc
  124. :loop8
  125. set %.old $gettok($line(@MidDir,%.do),2-,32)
  126. if (%.old isin %.ln) goto nope7
  127. if ($_vd(.do) > 0) goto loop8
  128. }
  129. aline @MidDir [á] %.ln
  130. inc %.sc
  131. :nope7
  132. inc %.done
  133. if ($_vi(.psh) > 8) {
  134. unset %.psh
  135. set %.perc $int($calc(%.done * 100 / %.todo))
  136. _progress.2 %.perc Determining Midi directories...
  137. }
  138. if ($_vi(.cur2) <= %.cur) goto loop7
  139. :nope2
  140. set %.cur $line(@Wav,0)
  141. if (%.cur == 0) goto nope3
  142. set %.cur2 1
  143. set %.sc 0
  144. :loop9
  145. set %.ln $nofile($line(@Wav,%.cur2))
  146. if ((recycle isin %.ln) || (temp isin %.ln) || (downl isin %.ln) || (tmp isin %.ln) || (cache isin %.ln) || (win isin %.ln)) goto nope9
  147. if (%.sc > 0) {
  148. set %.do %.sc
  149. :loop0
  150. set %.old $gettok($line(@WavDir,%.do),2-,32)
  151. if (%.old isin %.ln) goto nope9
  152. if ($_vd(.do) > 0) goto loop0
  153. }
  154. aline @WavDir [á] %.ln
  155. inc %.sc
  156. :nope9
  157. inc %.done
  158. if ($_vi(.psh) > 8) {
  159. unset %.psh
  160. set %.perc $int($calc(%.done * 100 / %.todo))
  161. _progress.2 %.perc Determining Wav directories...
  162. }
  163. if ($_vi(.cur2) <= %.cur) goto loop9
  164. :nope3
  165. window -c @Wav | window -c @MP | window -c @Mid
  166. window -c @EXE | window -c @INI | window -c @Progress
  167. }
  168. else {
  169. _reqparam 1nosc1N Would you like to import settings from a previous copy of mIRC? (P&P, another script, or plain mIRC)
  170. }
  171. 1proceed
  172. }
  173. 1nosc1 {
  174. if (Y !isin $1) 1proceed
  175. .timer -m 1 10 1nosc1b
  176. }
  177. 1nosc1b {
  178. set %.ini $dir="Select MIRC.INI to import" c:\mirc.ini
  179. if ((%.ini == $null) || (%.ini == $mircdirmirc.ini)) 1proceed
  180. 1mirc %.ini
  181. }
  182. 1proceed {
  183. if ($line(@Mirc,0) > 0) {
  184. iline @Mirc 1 Previous copies of mIRC were found.
  185. iline @Mirc 2 Double-click on an .INI to import the settings
  186. iline @Mirc 3 - OR -
  187. iline @Mirc 4 Double-click HERE to not import any settings
  188. iline @Mirc 5 (copies of mIRC with scripts CAN be imported)
  189. iline @Mirc 6 $chr(160)
  190. window -r @Mirc
  191. halt
  192. }
  193. set %_new $_mircdir $+ mirc.ini
  194. _reqparam 1cm1 Enter your preferred nickname:
  195. }
  196. 1cm1 _writeini %_new mirc nick $1 | _reqparam 1cm2 Enter your alternate nickname:
  197. 1cm2 _writeini %_new mirc anick $1 | _reqparam 1cm3anon@peace.com Enter the e-mail address to show in mIRC: (does not need to be your real e-mail)
  198. 1cm3 _writeini %_new mirc email $1 | _reqparam 1cm4PeaceandProtectionv3.20 Enter your "real name" or "quote" to show in your IRC info: (can be any info you desire)
  199. 1cm4 _writeini %_new mirc user $1- | _reqparam 1cm5peace Enter your "identd", the portion of your IRC or e-mail address to the left of the @ sign:
  200. 1cm5 _writeini %_new ident userid $1 | _writeini %_new ident active yes | 1cont
  201. 1mirc {
  202. if ($1 == $null) {
  203. set %.ln $sline(@Mirc,1).ln
  204. if (%.ln == 4) { window -c @Mirc | 1proceed | halt }
  205. if (%.ln < 7) halt
  206. set %.ini $sline(@Mirc,1)
  207. }
  208. else set %.ini $1-
  209. if ($chr(32) isin %.ini) set %.ini " $+ %.ini $+ "
  210. set %.new $_mircdir $+ mirc.ini
  211. set %.ln 1
  212. set %.max $lines(%.ini)
  213. unset %.gr
  214. :loop
  215. set %.get $read -nl [ $+ [ %.ln ] ] %.ini
  216. if ($left(%.get,1) == $chr(91)) {
  217. if (%.get !isin [rgb][autoop][protect][ignore][perform][logging][windows][timestamp][wizard][fileserver][fonts][ontop][channels][dccserver][channelfiles][channelslist][extensions][Finger][ident][socks][DCCNicks][local][text][mirc][dirs][notify][colours][options]) unset %.gr
  218. else set %.gr $remove($remove(%.get,$chr(91)),$chr(93))
  219. }
  220. elseif ((%.gr != $null) && (%.get != $null)) {
  221. set %.opt $gettok(%.get,1,61)
  222. set %.wr $gettok(%.get,2-,61)
  223. if (%.gr == options) {
  224. if (%.opt == n1) set %.wr $gettok(%.wr,1-19,44) $+ ,0, $+ $gettok(%.wr,21-,44)
  225. if (%.opt == n2) set %.wr $gettok(%.wr,1-15,44) $+ ,1, $+ $gettok(%.wr,17-,44)
  226. if (%.opt == n3) set %.wr $gettok(%.wr,1-18,44) $+ ,0,1,0, $+ $gettok(%.wr,22-23,44) $+ ,0, $gettok(%.wr,25-,44)
  227. if (%.opt == n5) set %.wr $gettok(%.wr,1-13,44) $+ ,5, $+ $gettok(%.wr,15-26,44) $+ ,0
  228. }
  229. if (%.opt != quit) _writeini %.new %.gr %.opt %.wr
  230. }
  231. if ($_vi(.ln) <= %.max) goto loop
  232. set %.logs $readini %.new dirs logdir
  233. if (: isin %.logs) _writeini %.new dirs logdir logs\
  234. 1cont
  235. }
  236. 1cont {
  237. window -c @Mirc
  238. if ($line(@P&P,0) > 0) {
  239. iline @P&P 1 Previous copies of Peace and Protection were found.
  240. iline @P&P 2 Double-click on an .INI to import the settings
  241. iline @P&P 3 - OR -
  242. iline @P&P 4 Double-click HERE to not import any settings
  243. iline @P&P 5 (any version 2.60 and up can be imported)
  244. iline @P&P 6 $chr(160)
  245. window -r @P&P
  246. halt
  247. }
  248. elseif ((%pp.setuptype == 13) && ($1 != !)) {
  249. _reqparam 2nosc2N Would you like to import settings from another copy of Peace and Protection? (2.60, 3.00, 3.14, or 3.20)
  250. }
  251. window -c @P&P
  252. _reqparam 1cp0 Now it is time to ask you a few configuration questions. If you do not understand a question, simply hit Enter to accept the default value. Press 1Enter now to continue.
  253. }
  254. 2nosc2 {
  255. if (Y !isin $1) 1cont !
  256. .timer -m 1 10 2nosc2c
  257. }
  258. 2nosc2c {
  259. set %.ini $dir="Select CONFIG.INI to import (from P&P)" $mircdirp&p\config.ini
  260. if ((%.ini == $null) || (%.ini == $mircdirpp300\config.ini)) 1cont !
  261. 1pp %.ini
  262. }
  263. 1cp0 {
  264. set %.mir $_mircdir $+ mirc.ini
  265. set %_new $_mircdir $+ pp300\config.ini
  266. _writeini %_new Sound LeechCmd ! $+ $readini -n %.mir mirc nick
  267. _reqparam 1cp1Seperate Would you like ping replies to display to your active window, status window, or a seperate @Ping window? (Type 1active, 1status, or 1seperate and press Enter)
  268. }
  269. 1cp1 {
  270. if ($left($1,1) == a) set %ping.route -ai2 | elseif ($left($1,2) == st) set %ping.route -si2 | else set %ping.route @Ping
  271. _reqparam 1cp2Seperate Would you like whois replies to display to your active window, status window, or a seperate @Whois window? (Type 1active, 1status, or 1seperate and press Enter)
  272. }
  273. 1cp2 {
  274. if ($left($1,1) == a) set %whois.route -ai2 | elseif ($left($1,2) == st) set %whois.route -si2 | else set %whois.route @Whois
  275. _reqparam 1cp3Active Would you like CTCPs and other events to display to your active window or status window? (Type 1active or 1status and press Enter)
  276. }
  277. 1cp3 {
  278. if ($left($1,1) == s) set %event.route -si2 | else set %event.route -ai2
  279. _reqparam 1cp4N Show address (user@host) of users who send you CTCPs? (Type 1Y or 1N and press Enter)
  280. }
  281. 1cp4 {
  282. set %+disp.address $_o2tf($1)
  283. _reqparam 1cp515 Automatically set yourself as away after how many minutes? (Use 0 to disable)
  284. }
  285. 1cp5 {
  286. if ($1 isnum) set %autoaway.idle $calc($1 * 60)
  287. _reqparam 1cp6Status Would you like notify events (users on your notify list joining and leaving IRC) to display to your active window, status window, or nowhere? (Type 1active, 1status, or 1none and press Enter)
  288. }
  289. 1cp6 {
  290. if ($left($1,1) == a) set %notify.route -ai2 | elseif ($left($1,2) == n) set %notify.route none | else set %notify.route -si2
  291. 1ca1
  292. }
  293. 1ca1 {
  294. _reqparam 1ca2N If a flood is detected, change to a random nickname? (Type 1Y or 1N and press Enter)
  295. }
  296. 1ca2 {
  297. set %+nickchange.flood $_o2tf($1)
  298. set %+cf9.nickchange $_o2tf($1)
  299. _reqparam 1ca3N Automatically ignore DCC chats and sends from users not in your notify list or userlist? (Type 1Y or 1N and press Enter)
  300. }
  301. 1ca3 {
  302. if ($_o2tf($1)) {
  303. set %accept.chat Notice
  304. set %accept.send Notice
  305. set %accept.chataway Notice
  306. set %accept.sendaway Notice
  307. }
  308. _reqparam 1ca4Y Automatically accept DCC chats and sends from users in your notify list or userlist? (Type 1Y or 1N and press Enter)
  309. }
  310. 1ca4 {
  311. if ($_o2tf($1)) {
  312. set %accept.knownchat Auto
  313. set %accept.knownsend Auto
  314. set %accept.knownchataway Auto
  315. set %accept.knownsendaway Auto
  316. }
  317. _reqparam 1ca5Y Color nicknames in channel nicklist different colors depending on whether they are in your userlist, notify list, ircops, etc.? This option may not be suitable for slow computers. (Type 1Y or 1N and press Enter)
  318. }
  319. 1ca5 {
  320. set %+nickcolors $_o2tf($1)
  321. _reqparam 1ca6N Attempt to automatically request sound files that other people play that you do not own? (Type 1Y or 1N and press Enter)
  322. }
  323. 1ca6 {
  324. _writeini %_new Sound AutoGet $_o2tf($1)
  325. _reqparam 1ca7N When a user joins, if you've seen them get banned before or kicked at least twice before, display a note to yourself regarding this? (Type 1Y or 1N and press Enter)
  326. }
  327. 1ca7 {
  328. set %+joinstat $_o2tf($1)
  329. set %+kickstat $_o2tf($1)
  330. _reqparam 1ca8N Would you like to see IRCop wallops by default? (Type 1Y or 1N and press Enter)
  331. }
  332. 1ca8 {
  333. set %+mode.w $_o2tf($1)
  334. _reqparam 1ca9Y Would you like to see relevant server notices by default? (Type 1Y or 1N and press Enter)
  335. }
  336. 1ca9 {
  337. set %+mode.s $_o2tf($1)
  338. _reqparam 1ca10Query When you double-click on a user's nickname in a channel, would you like a private query window to be opened, or would you like to whois the user? (Type 1Query or 1Whois and press Enter)
  339. }
  340. 1ca10 {
  341. if (w isin $1) set %dclick.nickcmd whois | else set %dclick.nickcmd query
  342. _reqparam 1ca11Central When you double-click in a channel, would you like to open mIRC's default "channel central", view/edit just the banlist, or simply edit the topic? (Type 1Central, 1Banlist, or 1Topic and press Enter)
  343. }
  344. 1ca11 {
  345. if (b isin $1) set %dclick.chancmd ban | elseif (c isin $1) set %dclick.chancmd channel | else set %dclick.chancmd etopic
  346. _reqparam 1ca12N Record information on when you "last saw" users on your notify/userlist, so you can recall this information with /seen? (may cause delays on channel parts) (Type 1Y or 1N and press Enter)
  347. }
  348. 1ca12 {
  349. if ($_o2tf($1)) .enable #lastseen | else .disable #lastseen
  350. _reqparam 1ca13Simple Would you like pressing F6 to bring up a simple color selection menu or a set of complex color formatting menus? (Type 1Simple or 1Complex and press Enter)
  351. }
  352. 1ca13 {
  353. if (c isin $1) set %+f6.simple.color $false | else set %+f6.simple.color $true
  354. _reqparam 1ca14Back Would you like /b to stand for "/back" or "/ban"? (Type 1Back or 1Ban and press Enter)
  355. }
  356. 1ca14 {
  357. if (n isin $1) set %+aliasb.to.ban $true | else set %+aliasb.to.ban $false
  358. 1next
  359. }
  360. 1pp {
  361. if ($1 == $null) {
  362. set %.ln $sline(@P&P,1).ln
  363. if (%.ln == 4) { window -c @P&P | 1cont | halt }
  364. if (%.ln < 7) halt
  365. set %.ini $sline(@P&P,1)
  366. }
  367. else set %.ini $1-
  368. if ($chr(32) isin %.ini) set %.ini " $+ %.ini $+ "
  369. set %.new $_mircdir $+ pp300\config.ini
  370. if (pp300 !isin %.ini) {
  371. _writeini %.new misc pager $readini -n %.ini sound pager
  372. _writeini %.new misc Favorites $readini -n %.ini misc Favorites
  373. set %.is $readini -n %.ini misc RetainAwayOnSignon
  374. _writeini %.new misc RetainAwayOnSignon $_o2tf(%.is)
  375. set %.is $readini -n %.ini ctcp IgnoreERRMSGReplies
  376. _writeini %.new misc IgnoreERRMSGReplies $_o2tf(%.is)
  377. set %.is $readini -n %.ini misc RejoinChansOnReconnect
  378. _writeini %.new misc RejoinChansOnReconnect $_o2tf(%.is)
  379. set %.ini $replace(%.ini,config.ini,variable.mrc)
  380. set %.is $read -ns%accept.mp %.ini
  381. set %+accept.mp $_o2tf(%.is)
  382. set %.is $read -ns%accept.wav %.ini
  383. set %+accept.wav $_o2tf(%.is)
  384. set %.is $read -ns%accept.mid %.ini
  385. set %+accept.mid $_o2tf(%.is)
  386. set %.is $read -ns%leech.command %.ini
  387. if (%.is != $null) _writeini %.new Sound LeechCmd %.is
  388. set %.is $read -ns%leech.show %.ini
  389. _writeini %.new Sound LeechShow $_o2tf(%.is)
  390. set %.is $read -ns%leech.types %.ini
  391. if (%.is != $null) _writeini %.new Sound LeechTypes %.is
  392. set %.is $read -ns%leech.other.dir %.ini
  393. if (%.is != $null) _writeini %.new Sound OtherDir %.is
  394. set %.is $read -ns%maxsend.leech %.ini
  395. if (%.is != $null) _writeini %.new Sound LeechMax %.is
  396. set %autoaway.idle $read -ns%aidle.sec %.ini
  397. set %.is $read -ns%aidle.quiet %.ini
  398. set %+autoaway.quiet $_o2tf(%.is)
  399. set %.is $read -ns%accept.sound.away %.ini
  400. set %+accept.sounds.away $_o2tf(%.is)
  401. set %.is $read -ns%accept.ebeeps.away %.ini
  402. set %+accept.ebeeps.away $_o2tf(%.is)
  403. set %awaywords $read -ns%awaywords %.ini
  404. set %.is $read -ns%disp.addr %.ini
  405. set %+disp.address $_o2tf(%.is)
  406. set %.is $read -ns%kickon.ban %.ini
  407. set %+filterkick.bans $_o2tf(%.is)
  408. set %xw.use $read -ns%use.xw %.ini
  409. set %.is $read -ns%must.xw.login %.ini
  410. set %+xw.must.login $_o2tf(%.is)
  411. set %.is $read -ns%event.route %.ini
  412. if (s isin %.is) set %event.route -si2
  413. else set %event.route -ai2
  414. set %.is $read -ns%time.stamp %.ini
  415. set %+time.stamp $_o2tf(%.is)
  416. set %.is $read -ns%shownotify %.ini
  417. if (s isin %.is) set %notify.route -si2
  418. elseif (a isin %.is) set %notify.route -ai2
  419. else set %notify.route none
  420. set %.is $read -ns%preply.window %.ini
  421. if (@ isin %.is) set %ping.route @Ping
  422. elseif (s isin ^%.is) set %ping.route -si2
  423. else set %ping.route -ai2
  424. set %.is $read -ns%whois.route %.ini
  425. if (@ isin %.is) set %whois.route @Whois
  426. elseif (s isin ^%.is) set %whois.route -si2
  427. else set %whois.route -ai2
  428. set %.is $read -ns%show.clone.scan %.ini
  429. set %+clonescan.hide $_not($_o2tf(%.is))
  430. set %.is $read -ns%show.black.list.scan %.ini
  431. set %+blackscan.hide $_not($_o2tf(%.is))
  432. set %.is $read -ns%accept.chat %.ini
  433. set %accept.chat %.is
  434. set %accept.knownchat %.is
  435. set %accept.chataway %.is
  436. set %accept.knownchataway %.is
  437. set %.is $read -ns%accept.send %.ini
  438. set %accept.send %.is
  439. set %accept.knownsend %.is
  440. set %accept.sendaway %.is
  441. set %accept.knownsendaway %.is
  442. set %.is $read -ns%verify.invites %.ini
  443. set %+verify.invites $_o2tf(%.is)
  444. set %.is $read -ns%imposter.alert %.ini
  445. set %+imposter.alert $_o2tf(%.is)
  446. set %.is $read -ns%unsolicited.notice %.ini
  447. set %+unsolicited.notice $_o2tf(%.is)
  448. set %max.clone $read -ns%max.clone %.ini
  449. set %warn.clone $read -ns%warn.clone %.ini
  450. set %strictMode $read -ns%enforce.mode %.ini
  451. set %.is $read -ns%ok.chan.sound.flood %.ini
  452. set %+sound.flood.ok $_o2tf(%.is)
  453. set %.is $read -ns%self.lag.alert %.ini
  454. if ((15 isin %.is) && (40 isin %.is)) { set %self.lag.warn1 15 | set %self.lag.warn2 40 }
  455. elseif (15 isin %.is) { set %self.lag.warn1 15 | set %self.lag.warn2 0 }
  456. elseif (40 isin %.is) { set %self.lag.warn1 0 | set %self.lag.warn2 40 }
  457. else { set %self.lag.warn1 0 | set %self.lag.warn2 0 }
  458. set %whois.onjoin $read -ns%whois.on.join %.ini
  459. set %.is $read -ns%showtitle %.ini
  460. if (n isin %.is) set %show.title Nickname
  461. else set %show.title Server
  462. set %nick.complete.chars $read -ns%nickc.chars %.ini
  463. window -c @P&P
  464. set %_new $_mircdir $+ pp300\config.ini
  465. _reqparam 1ca1 Now it is time to ask you a few configuration questions. If you do not understand a question, simply hit Enter to accept the default value. Press 1Enter now to continue.
  466. }
  467. else import300 %_req.col x %pp.first %pp.setuptype
  468. }
  469. import300 {
  470. .window -h @Filez
  471. .aline @Filez %.ini
  472. .aline @Filez %.new
  473. .remove %.new
  474. .copy %.ini %.new
  475. .writeini %.new CTCP Script Peace and Protection &ver& by misspai + &addons& (http://pairc.com/pnp/)
  476. .writeini %.new CTCP URL http://pairc.com/pnp/
  477. .load -rv $_mircdir $+ pp300\portup1.ini
  478. .remove $replace($line(@Filez,2),config.ini,variable.mrc)
  479. .copy $replace($line(@Filez,1),config.ini,variable.mrc) $replace($line(@Filez,2),config.ini,variable.mrc)
  480. .load -rv $_mircdir $+ pp300\variable.mrc
  481. .load -ru $_mircdir $+ pp300\portup1.ini
  482. .remove $replace($line(@Filez,2),config.ini,users.ini)
  483. .copy $replace($line(@Filez,1),config.ini,users.ini) $replace($line(@Filez,2),config.ini,users.ini)
  484. .load -ru $_mircdir $+ pp300\users.ini
  485. if ($exists($replace($line(@Filez,1),config.ini,styles.ini))) { .remove $replace($line(@Filez,2),config.ini,styles.ini) | .copy $replace($line(@Filez,1),config.ini,styles.ini) $replace($line(@Filez,2),config.ini,styles.ini) }
  486. if ($exists($replace($line(@Filez,1),config.ini,black.ini))) { .remove $replace($line(@Filez,2),config.ini,black.ini) | .copy $replace($line(@Filez,1),config.ini,black.ini) $replace($line(@Filez,2),config.ini,black.ini) }
  487. if ($exists($replace($line(@Filez,1),config.ini,email.ini))) { .remove $replace($line(@Filez,2),config.ini,email.ini) | .copy $replace($line(@Filez,1),config.ini,email.ini) $replace($line(@Filez,2),config.ini,email.ini) }
  488. if ($exists($replace($line(@Filez,1),config.ini,sound.ini))) { .remove $replace($line(@Filez,2),config.ini,sound.ini) | .copy $replace($line(@Filez,1),config.ini,sound.ini) $replace($line(@Filez,2),config.ini,sound.ini) }
  489. if ($exists($replace($line(@Filez,1),config.ini,userlist.ini))) { .remove $replace($line(@Filez,2),config.ini,userlist.ini) | .copy $replace($line(@Filez,1),config.ini,userlist.ini) $replace($line(@Filez,2),config.ini,userlist.ini) }
  490. set %_req.col $1
  491. set %pp.first $3
  492. set %pp.setuptype $4
  493. if ($remove($gettok(%pp.ver,1-2,46),v) < 3.14) {
  494. _fixr ping.route | _fixr whois.route
  495. _fixr snotice.route | _fixr wallop.route
  496. _fixr event.route | _fixr notify.route
  497. _fixr leech.route | _fixr motd.route
  498. set %font.fixtab 20
  499. set %pp.whois $_winpos(14%,7%,7%,9%)
  500. set %pp.ping $_winpos(14%,7%,9%,7%)
  501. unset %^snd.* %pp.dwidth %pp.dheight %+bantimerchk %_prvd %+nick.complete.anywhere %+nick.complete.globnotify %+dccincomp.remember %+awaylog.timestamp %font.fixed
  502. set %pp.clock 0
  503. set %pp.clock.beep $false
  504. set %pp.clock.save $true
  505. set %pp.clock.active $true
  506. set %+flash.queryh $true
  507. set %+flash.querya $false
  508. set %+flash.msgh $false
  509. set %+flash.msga $false
  510. set %+flash.dcch $false
  511. set %+flash.dcca $false
  512. set %+desktopping $false
  513. }
  514. set %pp.ver v3.20.b
  515. window -c @P&P
  516. 1next
  517. }
  518. 1next {
  519. if ($line(@Player,0) > 0) {
  520. iline @Player 1 The following MP2/3 players were found.
  521. iline @Player 2 Peace and Protection needs to know which player to use.
  522. iline @Player 3 Double-click on a player to select it.
  523. iline @Player 4 - OR -
  524. iline @Player 5 Double-click HERE for none.
  525. iline @Player 6 $chr(160)
  526. window -r @Player
  527. halt
  528. }
  529. 1setplayer
  530. }
  531. 1player {
  532. set %.ln $sline(@Player,1).ln
  533. if (%.ln == 5) { 1setplayer | halt }
  534. if (%.ln < 7) halt
  535. 1setplayer $sline(@Player,1)
  536. }
  537. 1setplayer {
  538. window -c @Player
  539. set %_new $_mircdir $+ pp300\config.ini
  540. set %_mini $_mircdir $+ mirc.ini
  541. _writeini %_new Sound MP2Player $1-
  542. _writeini %_new Sound MP3Player $1-
  543. 1domp
  544. }
  545. 1domp {
  546. if ($line(@MPDir,0) > 0) {
  547. iline @MPDir 1 The following directories containing MP2/3 files were found.
  548. iline @MPDir 2 Peace and Protection needs to know where to find your MP2/3 files.
  549. iline @MPDir 3 Directories marked with [X] will be included in P&P's list.
  550. iline @MPDir 4 Directories marked with [á] will not.
  551. iline @MPDir 5 Double-click on a directory to toggle it.
  552. iline @MPDir 6 - THEN -
  553. iline @MPDir 7 Double-click HERE when you're finished.
  554. iline @MPDir 8 $chr(160)
  555. window -r @MPDir
  556. halt
  557. }
  558. 1setmp
  559. }
  560. 1mp {
  561. set %.ln $sline(@MPDir,1).ln
  562. if (%.ln == 7) {
  563. set %.ln 8
  564. unset %.fnd
  565. :loop
  566. set %.is $line(@MPDir,%.ln)
  567. if (%.is == $null) { if (%.fnd == $null) 1setmp | else 1setmp $_rchop(1,%.fnd) | halt }
  568. if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
  569. inc %.ln | goto loop
  570. }
  571. if (%.ln < 9) halt
  572. set %.is $sline(@MPDir,1)
  573. if ($gettok(%.is,1,32) == [X]) rline @MPDir %.ln [á] $gettok(%.is,2-,32)
  574. else rline @MPDir %.ln [X] $gettok(%.is,2-,32)
  575. }
  576. 1setmp {
  577. window -c @MPDir
  578. _writeini %_new Sound MPDir $1-
  579. if ($line(@MidDir,0) > 0) {
  580. iline @MidDir 1 The following directories containing Midi files were found.
  581. iline @MidDir 2 Peace and Protection needs to know where to find your Midi files.
  582. iline @MidDir 3 Directories marked with [X] will be included in P&P's list.
  583. iline @MidDir 4 Directories marked with [á] will not.
  584. iline @MidDir 5 Double-click on a directory to toggle it.
  585. iline @MidDir 6 - THEN -
  586. iline @MidDir 7 Double-click HERE when you're finished.
  587. iline @MidDir 8 $chr(160)
  588. aline @MidDir [á] $mircdirsounds\
  589. window -r @MidDir
  590. halt
  591. }
  592. 1setmid
  593. }
  594. 1mid {
  595. set %.ln $sline(@MidDir,1).ln
  596. if (%.ln == 7) {
  597. set %.ln 8
  598. unset %.fnd
  599. :loop
  600. set %.is $line(@MidDir,%.ln)
  601. if (%.is == $null) { if (%.fnd == $null) 1setmid | else 1setmid $_rchop(1,%.fnd) | halt }
  602. if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
  603. inc %.ln | goto loop
  604. }
  605. if (%.ln < 9) halt
  606. set %.is $sline(@MidDir,1)
  607. if ($gettok(%.is,1,32) == [X]) rline @MidDir %.ln [á] $gettok(%.is,2-,32)
  608. else rline @MidDir %.ln [X] $gettok(%.is,2-,32)
  609. }
  610. 1setmid {
  611. window -c @MidDir
  612. set %.1st $gettok($1-,1,59)
  613. set %.rest $gettok($1-,2-,59)
  614. _writeini %_mini dirs midis %.1st
  615. _writeini %_new Sound MoreMidiDir %.rest
  616. if ($line(@WavDir,0) > 0) {
  617. iline @WavDir 1 The following directories containing Wav files were found.
  618. iline @WavDir 2 Peace and Protection needs to know where to find your Wav files.
  619. iline @WavDir 3 Directories marked with [X] will be included in P&P's list.
  620. iline @WavDir 4 Directories marked with [á] will not.
  621. iline @WavDir 5 Double-click on a directory to toggle it.
  622. iline @WavDir 6 - THEN -
  623. iline @WavDir 7 Double-click HERE when you're finished.
  624. iline @WavDir 8 $chr(160)
  625. aline @WavDir [á] $mircdirsounds\
  626. window -r @WavDir
  627. halt
  628. }
  629. 1setwav
  630. }
  631. 1wav {
  632. set %.ln $sline(@WavDir,1).ln
  633. if (%.ln == 7) {
  634. set %.ln 8
  635. unset %.fnd
  636. :loop
  637. set %.is $line(@WavDir,%.ln)
  638. if (%.is == $null) { if (%.fnd == $null) 1setwav | else 1setwav $_rchop(1,%.fnd) | halt }
  639. if ($gettok(%.is,1,32) == [X]) set %.fnd %.fnd $+ ; $+ $gettok(%.is,2-,32)
  640. inc %.ln | goto loop
  641. }
  642. if (%.ln < 9) halt
  643. set %.is $sline(@WavDir,1)
  644. if ($gettok(%.is,1,32) == [X]) rline @WavDir %.ln [á] $gettok(%.is,2-,32)
  645. else rline @WavDir %.ln [X] $gettok(%.is,2-,32)
  646. }
  647. 1setwav {
  648. window -c @WavDir
  649. set %.1st $gettok($1-,1,59)
  650. set %.rest $gettok($1-,2-,59)
  651. _writeini %_mini dirs waves %.1st
  652. _writeini %_new Sound MoreWaveDir %.rest
  653. unset %pp.setuptype
  654. set %pp.first once
  655. unset %pp.addon %pp.addon.ids %addon.*
  656. flushini variable.mrc
  657. flushini config.ini
  658. flushini mirc.ini
  659. if ($bits == 16) set %.exe mirc.exe
  660. else set %.exe mirc32.exe
  661. if ($exists(peacepro.doc)) .remove peacepro.doc
  662. set %.old $mircdirp&p\s-main.mrc
  663. if ($exists(%.old)) _reqparam 1fin First time configuration is complete. Once in Peace and Protection type /config or browse the P&P Tools menu for more options. You can delete the $mircdirP&P\ subdirectory- It was used in 2.60 and is no longer needed. Press 1Enter now to start Peace and Protection.
  664. else _reqparam 1fin First time configuration is complete. Once in Peace and Protection you can type /config for more detailed configuration, or browse the P&P Tools menu (especially under "Script") for more options. Press 1Enter now to start Peace and Protection.
  665. }
  666. _writeini if ($4 == $null) remini $1- | else writeini $1-
  667. 1fin run %.exe | exit